package com.flex.mobile.util;

/**
 * 
 * @author zhxiaomiao
 *
 */
public class SqlUtil {
	/**
	 * 构造格式为xx in (?, ?, ?)的条件
	 * 
	 * @param count 参数个数
	 * @return
	 */
	public static String inSql(int count) {
		if (count == 1) {
			return " = ?";
		} else {
			StringBuffer buf = new StringBuffer();
			buf.append(" in (?");
			for (int i = 1; i < count; i++) {
				buf.append(", ?");
			}
			buf.append(")");
			return buf.toString();
		}
	}
}
